#!/bin/bash

cd ../../
# <[i,r,c],o>
# <[o,r,c],i>
# <[o,i],[r,c]>

for loop_order in 1
do
    #./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[0]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --explore-loop-permute --loop-permute-order=$loop_order
    #./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[1]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --explore-loop-permute --loop-permute-order=$loop_order
    ./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[2]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --select-rar-dep="{kernel[]->__pet_ref_3[1]}" --explore-loop-permute --loop-permute-order=$loop_order    
    #./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[3]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --local-reduce --reduce-op="+" --simd-touch-space --explore-loop-permute --loop-permute-order=$loop_order
    #./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[4]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --explore-loop-permute --loop-permute-order=$loop_order
    ./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[5]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --select-rar-dep="{kernel[]->__pet_ref_3[1]}" --explore-loop-permute --loop-permute-order=$loop_order
    #./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[6]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --local-reduce --reduce-op="+" --simd-touch-space --explore-loop-permute --loop-permute-order=$loop_order
    #./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[7]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --explore-loop-permute --loop-permute-order=$loop_order
    #./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[8]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --local-reduce --reduce-op="+" --simd-touch-space --explore-loop-permute --loop-permute-order=$loop_order
    ./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[9]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --select-rar-dep="{kernel[]->__pet_ref_3[1]}" --local-reduce --reduce-op="+" --simd-touch-space --explore-loop-permute --loop-permute-order=$loop_order
done

for loop_order in 0 2
do
    #./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[0]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --explore-loop-permute --loop-permute-order=$loop_order
    #./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[1]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --explore-loop-permute --loop-permute-order=$loop_order
    ./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[2]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --select-rar-dep="{kernel[]->__pet_ref_3[1]}" --explore-loop-permute --loop-permute-order=$loop_order
    #./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[3]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --simd-touch-space --explore-loop-permute --loop-permute-order=$loop_order
    #./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[4]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --explore-loop-permute --loop-permute-order=$loop_order
    ./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[5]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --select-rar-dep="{kernel[]->__pet_ref_3[1]}" --explore-loop-permute --loop-permute-order=$loop_order
    #./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[6]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --simd-touch-space --explore-loop-permute --loop-permute-order=$loop_order
    #./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[7]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --explore-loop-permute --loop-permute-order=$loop_order
    #./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[8]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --simd-touch-space --explore-loop-permute --loop-permute-order=$loop_order
    ./autosa ./autosa_tests/cnn/kernel.c --config=./autosa_config/autosa_config.json --target=autosa_hls_c --output-dir=./autosa.tmp/output --sa-sizes="{kernel[]->space_time[9]}" --simd-info=./autosa_tests/cnn/simd_info.json --host-serialize --hls --tuning-method=1 --param-names=./autosa_tests/cnn/param_names.json --simd-touch-space --explore-loop-permute --select-rar-dep="{kernel[]->__pet_ref_3[1]}" --loop-permute-order=$loop_order
done
cd -
